import requests
class IhrmLogin(object):
    # 没有用到self,cls就用静态方法
    @staticmethod
    def ihrm_login(login_data):
        resp = requests.post("http://ihrm-test.itheima.net/api/sys/login",
                             json =login_data)
        # 记得返回 return
        return resp
if __name__ == '__main__':
    r1 = IhrmLogin.ihrm_login({"mobile": "13800000002","password": "123456"})
    print(r1.json())